Skip to content

Conversation

@sunliang98
Copy link
Collaborator

@sunliang98 sunliang98 commented Jan 13, 2025

Reminder

  • Have you linked an issue with this pull request?
  • Have you added adequate unit tests and/or case tests for your pull request?
  • Have you noticed possible changes of behavior below or in the linked issue?
  • Have you explained the changes of codes in core modules of ESolver, HSolver, ElecState, Hamilt, Operator or Psi? (ignore if not applicable)

Linked Issue

Fix #4844

Unit Tests and/or Case Tests for my changes

  • A unit test is added for each new feature or bug fix.

What's changed?

  • Output a warning when the lattice vector is left-handed.
  • What's more, when the lattice vector is left-handed, VASP would stop, while QE would warn the user and turn it to right-handed.

Any changes of core modules? (ignore if not applicable)

  • Example: I have added a new virtual function in the esolver base class in order to ...

@sunliang98 sunliang98 requested a review from mohanchen January 13, 2025 13:02
@mohanchen mohanchen added Features Needed The features are indeed needed, and developers should have sophisticated knowledge Refactor Refactor ABACUS codes labels Jan 13, 2025
@sunliang98
Copy link
Collaborator Author

During testing, I noticed many cases use left-handed lattice vectors, and users might be relying on this as well. If the program quits due to a left-handed system, it could disrupt otherwise valid calculations.
As a result, I suggest issuing a warning but not terminating the program, turn the volume to positive and continue, similar to QE's approach. This alerts users without interrupting their workflows. @mohanchen

sunliang98 and others added 3 commits January 17, 2025 16:58
…n_Si2_npsin2, 120_PW_KP_MD_NPT, 170_PW_MD_2O, and mulliken.txt.ref of 211_NO_S2_nupdown0
…olume to positive and continue, similar to QE's approach.
@sunliang98 sunliang98 changed the title Fix: Warning Quit when the lattice vector is left-handed. Fix: Output a warning when the lattice vector is left-handed. Jan 17, 2025
@mohanchen mohanchen merged commit e927eab into deepmodeling:develop Jan 18, 2025
14 checks passed
Fisherd99 pushed a commit to Fisherd99/abacus-BSE that referenced this pull request Mar 31, 2025
…deling#5855)

* Fix: Warning Quit when the lattice vector is left-handed.

* Test: Change the left-handed lattice vectors in integrate tests and examples to right-handed.

* Test: Change the left-handed lattice vectors in integrate tests to right-handed

* Test: Update several integrate tests again

* Test: Update the result.ref of 108_PW_RE, 111_PW_elec_add, 116_PW_scan_Si2_npsin2, 120_PW_KP_MD_NPT, 170_PW_MD_2O, and mulliken.txt.ref of 211_NO_S2_nupdown0

* Refactor: Issue a warning but not terminating the program, turn the volume to positive and continue, similar to QE's approach.
@sunliang98 sunliang98 deleted the fix branch April 10, 2025 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Features Needed The features are indeed needed, and developers should have sophisticated knowledge Refactor Refactor ABACUS codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: atomic positions in charge density Gaussian cube file are incorrect

2 participants